import React from 'react'
import { Text, View, Button, Image, Alert } from 'react-native'
import { store } from '../store';


class Main extends React.Component {
    state = {
        text: "哈哈哈",
        ...store.getState()
    }
    Cs = () => {

        console.log(this.props.navigation);
        // 2
    }

    render() {

        return (
            <View style={{ flex: 1 }}>
                <Text>{this.state.text}</Text>
                <Image source={{ uri: this.state.avatar }} style={{ width: 100, height: 100 }}></Image>
                <Text> MainPage </Text>
                <Button title="点我到百度" onPress={() => this.props.navigation.navigate("MyWebView")}></Button>
                <Button title="测试" onPress={this.Cs}></Button>
            </View>
        )
    }
}

export default Main;